<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>购物车页</title>
    <link rel="stylesheet"  type="text/css"  href="../css/cart.css"/>
    <script language="javascript" src="../js/jquery-3.1.0.js" ></script>
    <script src="../js/lodash.js"></script>
    <script language="javascript" src="../js/cart.js" ></script>
    <script type="text/javascript" src="../js/jquery.tmpl.min.js"></script>
    <script id="form" type="text/x-jquery.tmpl">
        <tr id='${name}'>
                <td>${classification}</td>
                <td class="name">${name}</td>
                <td>${price}</td>
                <td>${unit}</td>
                <td class="button"><button class="less">-</button><input id="show" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" class="show" value="${count}"></input><button class="add">+</button></td>
                <td><b class="pro">${subtotal}</b></td>
         </tr>
    </script>
</head>
<body>
<div>
    <ul class="navigation">
        <li><a href="product_list.html">Let's Go</a></li>
        <li><a id="home" href="home.html">主页</a></li>
        <li><a id="product" href="product_list.html">商品列表</a></li>
        <li class="all_cart"><img  src="../shopping_cart.png" /><a class="cart">购物车(<b id="sum_count"></b>)</a></li>
    </ul>
    <div class="form">
        <div class="caption">
            <caption>购物清单</caption>
        </div>
        <table id="product_list">
            <th class="classification">分类</th>
            <th class="name">名称</th>
            <th class="price">单价（元）</th>
            <th class="unit">单位</th>
            <th class="count">数量</th>
            <th class="money">小计</th>
        </table>
        <div class="sum">总计：<a id="sum_money"></a> 元</div>
        <button class="pay">付款</button>
    </div>
</div>
</body>
</html>